package com.quarantine.util;

import java.util.Collection;
import java.util.Date;

import org.springframework.security.core.GrantedAuthority;
import org.springframework.security.core.userdetails.User;

//import com.parkson.model.Member;

/**
 * 扩展SpringSecurity的WebAuthenticationDetails类, 增加登录时间属性和角色属性.
 * 
 * @author calvin
 */
public class OperatorDetails extends User {
	private static final long serialVersionUID = 1919464185097508773L;

//	private Member employee;
	private Date loginTime;


	public OperatorDetails(String username, String password, boolean loginable,
			boolean employeeNonExpired, boolean credentialsNonExpired,
			boolean employeeNonLocked, Collection<GrantedAuthority> authorities)
			throws IllegalArgumentException {
		super(username, password, loginable, employeeNonExpired,
				credentialsNonExpired, employeeNonLocked, authorities);
	}

	public Date getLoginTime() {
		return loginTime;
	}

	public void setLoginTime(Date loginTime) {
		this.loginTime = loginTime;
	}


//	public Member getEmployee() {
//		return employee;
//	}
//
//	public void setEmployee(Member employee) {
//		this.employee = employee;
//	}

}
